﻿//// Copyright © Microsoft Corporation.  All Rights Reserved.
//// This code released under the terms of the 
//// Microsoft Public License (MS-PL, http://opensource.org/licenses/ms-pl.html.)

//using System;
//using System.Windows.Data;

//namespace TheOliver.Phone.Tools
//{
//    public class IntConverter : IValueConverter
//    {

//        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
//        {
//            if (value == null)
//            {
//                return 0;
//            }
//            string s = value.ToString();
//            if (s.IndexOf(".") >= 0)
//            {
//                s = s.Substring(0, s.IndexOf("."));
//            }
//            int i = int.Parse(s);
//            return i;
//        }

//        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
//        {
//            return null;
//        }
//    }
//}
